package com.aaa.system.controller.api;

import com.aaa.entity.Dept;
import com.aaa.system.service.DeptService;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.util.List;

/**
 * @program: his-open-parent
 * @description:
 * @author: 闫克起2
 * @create: 2023-03-21 11:15
 **/
@RestController
@RequestMapping("/system/api/dept")
public class ApiDeptController {

    @Autowired
    private DeptService deptService;

    @GetMapping("list")
    public Result<List<Dept>> list(){
        return deptService.findAll();
    }
}
